<?php
/**
 * Represents a method from embrace_model
 * 
 * @author s.marletta
 * @version $Id: EmbraceMethod.php 6 2009-04-28 20:11:07Z embrace.toolkit $
 */
class EmbraceMethod {
	/**
	 * Name of the method.
	 * @var String
	 */
	private $methodName;
	
	/**
	 * Type of the method.
	 * @var String
	 */
	private $type;
	
	/**
	 * Creates a EmbraceMehtod object.
	 * 
	 * @param $name name of the method
	 * @param $type type of the method
	 */
	public function EmbraceMethod($name, $type) {
		if(empty($name))
			throw new Exception("Methodname must be given.");
			
		if(empty($type))
			throw new Exception("Methods type must be given");
			
		$this->methodName = $name;
		$this->type = $type;		
	}

	/**
	 * Returns the name of the method.
	 * @return String
	 */
	public function getMethodName() {
		return $this->methodName;
	}
	
	/**
	 * Returns the type of the method
	 * @return String
	 */
	public function getMethodType() {
		return $this->type;
	}
}
?>